<template>
	<view class="article column">
		<u-navbar :title="article.title" autoBack placeholder />
		<u-parse :content="article.content"></u-parse>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import {
		getArticle
	} from '@/api/article'
	import {
		onLoad,
	} from "@dcloudio/uni-app";
	const article = ref({
		title: '',
		content: ''
	})
	onLoad(async (options) => {
		let res = await getArticle({
			code: options.code
		})
		if (res) article.value = res.data
	})
</script>

<style lang="scss" scoped>
	.article {
		width: calc(100% - 60rpx);
		min-height: calc(100% - 60rpx);
		padding: 30rpx;
		word-break: break-all;
		background: #fff;
	}
</style>